import request from '@/utils/request.js'

//目标的查看与上传
export const addTarget = ({ userId,name,description,progress,deadline}) =>
    request.post('/target/addtarget', {userId,name,description,progress,deadline,})

export const getTargetList = (userId) =>request.get('/target/gettarget', {
    params: {
        userId: userId,  // 将 userId 作为查询参数传递
    }
})

export const updateTarget = ({ id,name,description,progress,deadline}) =>
  request.put('/target/updatetarget', {id,name,description,progress,deadline})
